Skip to content

fix(scripts): fix create-package path check#5118

Closed
ccharly wants to merge 1 commit intomainfrom
fix/yarn-create-package
Closed

fix(scripts): fix create-package path check#5118
ccharly wants to merge 1 commit intomainfrom
fix/yarn-create-package

Conversation

@ccharly
Copy link
Contributor

@ccharly ccharly commented Jan 9, 2025

Explanation

It was not possible to use yarn create-package to create new package with the current implementation since fs.stat throws an error if the path does not exists.

Also, I replaced stat by access, cause if the path already exists (no matter if it's a dir or file), the script will fail since the path is not "available".

References

N/A

Changelog

N/A

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@ccharly ccharly requested a review from mcmire January 9, 2025 14:28
@mcmire
Copy link
Contributor

mcmire commented Jan 14, 2025

This was fixed by #5123. I think your way might be a bit better, but the core bug should already be fixed. So up to you on whether you still want to merge this.

@mcmire mcmire removed their request for review February 6, 2025 16:01
@ccharly ccharly closed this Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants